<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
      <el-form-item label="UserID" prop="userId">
        <el-input v-model="queryParams.userId" placeholder="请输入UserID" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CustNo" prop="custNo">
        <el-input v-model="queryParams.custNo" placeholder="请输入CustNo" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="AccountNumber" prop="accountNumber">
        <el-input v-model="queryParams.accountNumber" placeholder="请输入AccountNumber" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="BankCode" prop="bankCode">
        <el-input v-model="queryParams.bankCode" placeholder="请输入BankCode" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="FirstName" prop="firstname">
        <el-input v-model="queryParams.firstname" placeholder="请输入FirstName" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CrsRegistryID" prop="crsRegistryId">
        <el-input v-model="queryParams.crsRegistryId" placeholder="请输入CrsRegistryID" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="MiddleName" prop="middlename">
        <el-input v-model="queryParams.middlename" placeholder="请输入MiddleName" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="LastName" prop="lastname">
        <el-input v-model="queryParams.lastname" placeholder="请输入LastName" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="FullName" prop="fullname">
        <el-input v-model="queryParams.fullname" placeholder="请输入FullName" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Birthday" prop="dob">
        <el-input v-model="queryParams.dob" placeholder="请输入Birthday" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <!-- <el-form-item label="Age" prop="age">
        <el-input v-model="queryParams.age" placeholder="请输入Age" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Gender" prop="gender">
        <el-input v-model="queryParams.gender" placeholder="请输入Gender" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item> -->
      <el-form-item label="BVN" prop="bvn">
        <el-input v-model="queryParams.bvn" placeholder="请输入BVN" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <!-- <el-form-item label="Verified" prop="verified">
        <el-input v-model="queryParams.verified" placeholder="请输入Verified" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="VerifyStatus" prop="verifyStatus">
        <el-select v-model="queryParams.verifyStatus" placeholder="请选择VerifyStatus" clearable size="small">
          <el-option label="请选择字典生成" value="" />
        </el-select>
      </el-form-item> -->
      <!-- <el-form-item label="Phone1" prop="phone1">
        <el-input v-model="queryParams.phone1" placeholder="请输入Phone1" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item> -->
      <!-- <el-form-item label="Phone2" prop="phone2">
        <el-input v-model="queryParams.phone2" placeholder="请输入Phone2" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item> -->
      <el-form-item label="Phones" prop="phones">
        <el-input v-model="queryParams.phones" placeholder="请输入Phones" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Eamil1" prop="email1">
        <el-input v-model="queryParams.email1" placeholder="请输入Eamil1" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <!-- <el-form-item label="Email2" prop="email2">
        <el-input v-model="queryParams.email2" placeholder="请输入Email2" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Address1" prop="address1">
        <el-input v-model="queryParams.address1" placeholder="请输入Address1" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Address2" prop="address2">
        <el-input v-model="queryParams.address2" placeholder="请输入Address2" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Record" prop="record">
        <el-input v-model="queryParams.record" placeholder="请输入Record" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Owner" prop="owner">
        <el-input v-model="queryParams.owner" placeholder="请输入Owner" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="PlanType" prop="planType">
        <el-select v-model="queryParams.planType" placeholder="请选择PlanType" clearable size="small">
          <el-option label="请选择字典生成" value="" />
        </el-select>
      </el-form-item>
      <el-form-item label="Charge" prop="charge">
        <el-input v-model="queryParams.charge" placeholder="请输入Charge" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Method" prop="method">
        <el-input v-model="queryParams.method" placeholder="请输入Method" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="WalletBalance" prop="walletBalance">
        <el-input v-model="queryParams.walletBalance" placeholder="请输入WalletBalance" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="CreatedAt" prop="createdAt">
        <el-input v-model="queryParams.createdAt" placeholder="请输入CreatedAt" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Type" prop="type">
        <el-select v-model="queryParams.type" placeholder="请选择Type" clearable size="small">
          <el-option label="请选择字典生成" value="" />
        </el-select>
      </el-form-item>
      <el-form-item label="BillingStatus" prop="billingstatus">
        <el-select v-model="queryParams.billingstatus" placeholder="请选择BillingStatus" clearable size="small">
          <el-option label="请选择字典生成" value="" />
        </el-select>
      </el-form-item>
      <el-form-item label="PlanTerm" prop="planTerm">
        <el-input v-model="queryParams.planTerm" placeholder="请输入PlanTerm" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Archived" prop="archived">
        <el-input v-model="queryParams.archived" placeholder="请输入Archived" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Paid" prop="paid">
        <el-input v-model="queryParams.paid" placeholder="请输入Paid" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Currency" prop="currency">
        <el-input v-model="queryParams.currency" placeholder="请输入Currency" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Account" prop="account">
        <el-input v-model="queryParams.account" placeholder="请输入Account" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item> -->
      <!-- <el-form-item label="Customer" prop="customer">
        <el-input v-model="queryParams.customer" placeholder="请输入CCustomer" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item> -->
      <el-form-item label="ApiName" prop="apiName">
        <el-input v-model="queryParams.apiName" placeholder="请输入ApiName" clearable size="small"
                  @keyup.enter.native="handleQuery" />
      </el-form-item>
      <!-- <el-form-item label="Score" prop="score">
        <el-input v-model="queryParams.score" placeholder="请输入Score" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="Env" prop="env">
        <el-input v-model="queryParams.env" placeholder="请输入Env" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="LastUpdated" prop="lastUpdated">
        <el-input v-model="queryParams.lastUpdated" placeholder="请输入LastUpdated" clearable size="small"
          @keyup.enter.native="handleQuery" />
      </el-form-item> -->
      <el-form-item label="State" prop="state">
        <el-select v-model="queryParams.state" placeholder="请选择State" clearable size="small">
          <el-option v-for="dict in stateOptions" :key="dict.dictValue" :label="dict.dictLabel"
                     :value="dict.dictValue" />
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-left: 16px;">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
                   v-hasPermi="['bizsys:ext_identity_result:add']">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
                   v-hasPermi="['bizsys:ext_identity_result:edit']">修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
                   @click="handleDelete" v-hasPermi="['bizsys:ext_identity_result:remove']">删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
                   v-hasPermi="['bizsys:ext_identity_result:export']">导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="ext_identity_resultList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="ID" align="center" width="100" prop="id" />
      <el-table-column label="UserID" align="center" width="300" prop="userId" />
      <el-table-column label="CustNo" align="center" width="200" prop="custNo" />
      <el-table-column label="AccountNumber" align="center" width="150" prop="accountNumber" />
      <el-table-column label="BankCode" align="center" width="200" prop="bankCode" />
      <el-table-column label="CrsRegistryID" align="center" width="200" prop="crsRegistryId" />
      <el-table-column label="FirstName" align="center" width="150" prop="firstname" />
      <el-table-column label="MiddleName" align="center" width="150" prop="middlename" />
      <el-table-column label="LastName" align="center" width="150" prop="lastname" />
      <el-table-column label="FullName" align="center" width="250" prop="fullname" />
      <el-table-column label="Birthday" align="center" width="300" prop="dob" />
      <el-table-column label="Age" align="center" width="100" prop="age" />
      <el-table-column label="Gender" align="center" width="100" prop="gender" />
      <el-table-column label="BVN" align="center" width="150" prop="bvn" />
      <el-table-column label="Verified" align="center" width="100" prop="verified" />
      <el-table-column label="VerifyStatus" align="center" width="100" prop="verifyStatus" />
      <el-table-column label="Phone1" align="center" width="150" prop="phone1" />
      <el-table-column label="Phone2" align="center" width="150" prop="phone2" />
      <el-table-column label="Phones" align="center" width="400" prop="phones" />
      <el-table-column label="Eamil1" align="center" width="150" prop="email1" />
      <el-table-column label="Email2" align="center" width="150" prop="email2" />
      <el-table-column label="Address1" align="center" width="800" prop="address1" />
      <el-table-column label="Address2" align="center" width="800" prop="address2" />
      <el-table-column label="Record" align="center" width="220" prop="record" />
      <el-table-column label="Owner" align="center" width="220" prop="owner" />
      <el-table-column label="PlanType" align="center" width="220" prop="planType" />
      <el-table-column label="Charge" align="center" width="120" prop="charge" />
      <el-table-column label="Method" align="center" width="120" prop="method" />
      <el-table-column label="WalletBalance" align="center" width="120" prop="walletBalance" />
      <el-table-column label="CreatedAt" align="center" width="220" prop="createdAt" />
      <el-table-column label="Type" align="center" width="100" prop="type" />
      <el-table-column label="BillingStatus" align="center" width="100" prop="billingstatus" />
      <el-table-column label="PlanTerm" align="center" width="100" prop="planTerm" />
      <el-table-column label="Archived" align="center" width="100" prop="archived" />
      <el-table-column label="Paid" align="center" width="180" prop="paid" />
      <el-table-column label="Currency" align="center" width="100" prop="currency" />
      <el-table-column label="Account" align="center" width="220" prop="account" />
      <el-table-column label="Customer" align="center" width="220" prop="customer" />
      <el-table-column label="ApiName" align="center" width="250" prop="apiName" />
      <el-table-column label="Score" align="center" width="100" prop="score" />
      <el-table-column label="Env" align="center" width="100" prop="env" />
      <el-table-column label="LastUpdated" align="center" width="220" prop="lastUpdated" />
      <el-table-column label="PhotoID" align="center" width="1000" prop="photoId" />
      <el-table-column label="State" align="center" width="100" prop="state" :formatter="stateFormat" />
<!--      <el-table-column label="Remak" align="center" width="120" prop="remark" />-->
<!--      <el-table-column label="RspResult" align="center" prop="reqResult" />-->
      <el-table-column label="Operation" align="center" width="140" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
                     v-hasPermi="['bizsys:ext_identity_result:edit']">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
                     v-hasPermi="['bizsys:ext_identity_result:remove']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
                @pagination="getList" />

    <!-- 添加或修改身份验证数据对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="UserID" prop="userId">
          <el-input v-model="form.userId" placeholder="请输入UserID" />
        </el-form-item>
        <el-form-item label="CustNo" prop="custNo">
          <el-input v-model="form.custNo" placeholder="请输入CustNo" />
        </el-form-item>
        <el-form-item label="AccountNumber" prop="accountNumber">
          <el-input v-model="form.accountNumber" placeholder="请输入AccountNumber" />
        </el-form-item>
        <el-form-item label="BankCode" prop="bankCode">
          <el-input v-model="form.bankCode" placeholder="请输入BankCode" />
        </el-form-item>
        <el-form-item label="FirstName" prop="firstname">
          <el-input v-model="form.firstname" placeholder="请输入FirstName" />
        </el-form-item>
        <el-form-item label="CrsRegistryID" prop="crsRegistryId">
          <el-input v-model="form.crsRegistryId" placeholder="请输入CrsRegistryID" />
        </el-form-item>
        <el-form-item label="MiddleName" prop="middlename">
          <el-input v-model="form.middlename" placeholder="请输入MiddleName" />
        </el-form-item>
        <el-form-item label="LastName" prop="lastname">
          <el-input v-model="form.lastname" placeholder="请输入LastName" />
        </el-form-item>
        <el-form-item label="FullName" prop="fullname">
          <el-input v-model="form.fullname" placeholder="请输入FullName" />
        </el-form-item>
        <el-form-item label="Birthday" prop="dob">
          <el-input v-model="form.dob" placeholder="请输入Birthday" />
        </el-form-item>
        <el-form-item label="Age" prop="age">
          <el-input v-model="form.age" placeholder="请输入Age" />
        </el-form-item>
        <el-form-item label="Gender" prop="gender">
          <el-input v-model="form.gender" placeholder="请输入Gender" />
        </el-form-item>
        <el-form-item label="BVN" prop="bvn">
          <el-input v-model="form.bvn" placeholder="请输入BVN" />
        </el-form-item>
        <el-form-item label="Verified" prop="verified">
          <el-input v-model="form.verified" placeholder="请输入Verified" />
        </el-form-item>
        <el-form-item label="VerifyStatus">
          <el-radio-group v-model="form.verifyStatus">
            <el-radio label="1">请选择字典生成</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="Phone1" prop="phone1">
          <el-input v-model="form.phone1" placeholder="请输入Phone1" />
        </el-form-item>
        <el-form-item label="Phone2" prop="phone2">
          <el-input v-model="form.phone2" placeholder="请输入Phone2" />
        </el-form-item>
        <el-form-item label="Phones" prop="phones">
          <el-input v-model="form.phones" placeholder="请输入Phones" />
        </el-form-item>
        <el-form-item label="Eamil1" prop="email1">
          <el-input v-model="form.email1" placeholder="请输入Eamil1" />
        </el-form-item>
        <el-form-item label="Email2" prop="email2">
          <el-input v-model="form.email2" placeholder="请输入Email2" />
        </el-form-item>
        <el-form-item label="Address1" prop="address1">
          <el-input v-model="form.address1" placeholder="请输入Address1" />
        </el-form-item>
        <el-form-item label="Address2" prop="address2">
          <el-input v-model="form.address2" placeholder="请输入Address2" />
        </el-form-item>
        <el-form-item label="Record" prop="record">
          <el-input v-model="form.record" placeholder="请输入Record" />
        </el-form-item>
        <el-form-item label="Owner" prop="owner">
          <el-input v-model="form.owner" placeholder="请输入Owner" />
        </el-form-item>
        <el-form-item label="PlanType" prop="planType">
          <el-select v-model="form.planType" placeholder="请选择PlanType">
            <el-option label="请选择字典生成" value="" />
          </el-select>
        </el-form-item>
        <el-form-item label="Charge" prop="charge">
          <el-input v-model="form.charge" placeholder="请输入Charge" />
        </el-form-item>
        <el-form-item label="Method" prop="method">
          <el-input v-model="form.method" placeholder="请输入Method" />
        </el-form-item>
        <el-form-item label="WalletBalance" prop="walletBalance">
          <el-input v-model="form.walletBalance" placeholder="请输入WalletBalance" />
        </el-form-item>
        <el-form-item label="CreatedAt" prop="createdAt">
          <el-input v-model="form.createdAt" placeholder="请输入CreatedAt" />
        </el-form-item>
        <el-form-item label="Type" prop="type">
          <el-select v-model="form.type" placeholder="请选择Type">
            <el-option label="请选择字典生成" value="" />
          </el-select>
        </el-form-item>
        <el-form-item label="BillingStatus">
          <el-radio-group v-model="form.billingstatus">
            <el-radio label="1">请选择字典生成</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="PlanTerm" prop="planTerm">
          <el-input v-model="form.planTerm" placeholder="请输入PlanTerm" />
        </el-form-item>
        <el-form-item label="Archived" prop="archived">
          <el-input v-model="form.archived" placeholder="请输入Archived" />
        </el-form-item>
        <el-form-item label="Paid" prop="paid">
          <el-input v-model="form.paid" placeholder="请输入Paid" />
        </el-form-item>
        <el-form-item label="Currency" prop="currency">
          <el-input v-model="form.currency" placeholder="请输入Currency" />
        </el-form-item>
        <el-form-item label="Account" prop="account">
          <el-input v-model="form.account" placeholder="请输入Account" />
        </el-form-item>
        <el-form-item label="CCustomer" prop="customer">
          <el-input v-model="form.customer" placeholder="请输入CCustomer" />
        </el-form-item>
        <el-form-item label="ApiName" prop="apiName">
          <el-input v-model="form.apiName" placeholder="请输入ApiName" />
        </el-form-item>
        <el-form-item label="Score" prop="score">
          <el-input v-model="form.score" placeholder="请输入Score" />
        </el-form-item>
        <el-form-item label="Env" prop="env">
          <el-input v-model="form.env" placeholder="请输入Env" />
        </el-form-item>
        <el-form-item label="LastUpdated" prop="lastUpdated">
          <el-input v-model="form.lastUpdated" placeholder="请输入LastUpdated" />
        </el-form-item>
        <el-form-item label="PhotoID" prop="photoId">
          <el-input v-model="form.photoId" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="State" prop="state">
          <el-select v-model="form.state" placeholder="请选择State">
            <el-option v-for="dict in stateOptions" :key="dict.dictValue" :label="dict.dictLabel"
                       :value="dict.dictValue"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="Remak" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入Remak" />
        </el-form-item>
        <el-form-item label="ReqResult" prop="reqResult">
          <el-input v-model="form.reqResult" type="textarea" placeholder="请输入内容" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listExt_identity_result,
  getExt_identity_result,
  delExt_identity_result,
  addExt_identity_result,
  updateExt_identity_result,
  exportExt_identity_result
} from "@/api/bizsys/ext_identity_result";

export default {
  name: "Ext_identity_result",
  components: {},
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 身份验证数据表格数据
      ext_identity_resultList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // State字典
      stateOptions: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        userId: null,
        custNo: null,
        accountNumber: null,
        bankCode: null,
        firstname: null,
        crsRegistryId: null,
        middlename: null,
        lastname: null,
        fullname: null,
        dob: null,
        age: null,
        gender: null,
        bvn: null,
        verified: null,
        verifyStatus: null,
        phone1: null,
        phone2: null,
        phones: null,
        email1: null,
        email2: null,
        address1: null,
        address2: null,
        record: null,
        owner: null,
        planType: null,
        charge: null,
        method: null,
        walletBalance: null,
        createdAt: null,
        type: null,
        billingstatus: null,
        planTerm: null,
        archived: null,
        paid: null,
        currency: null,
        account: null,
        customer: null,
        apiName: null,
        score: null,
        env: null,
        lastUpdated: null,
        photoId: null,
        state: null,
        reqResult: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        state: [{
          required: true,
          message: "State不能为空",
          trigger: "change"
        }],
        createTime: [{
          required: true,
          message: "创建时间不能为空",
          trigger: "blur"
        }],
        updateTime: [{
          required: true,
          message: "更新时间不能为空",
          trigger: "blur"
        }]
      }
    };
  },
  created() {
    // this.getList();
    this.getDicts("state").then(response => {
      this.stateOptions = response.data;
    });
  },
  methods: {
    /** 查询身份验证数据列表 */
    getList() {
      this.loading = true;
      listExt_identity_result(this.queryParams).then(response => {
        this.ext_identity_resultList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // State字典翻译
    stateFormat(row, column) {
      return this.selectDictLabel(this.stateOptions, row.state);
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        userId: null,
        custNo: null,
        accountNumber: null,
        bankCode: null,
        firstname: null,
        crsRegistryId: null,
        middlename: null,
        lastname: null,
        fullname: null,
        dob: null,
        age: null,
        gender: null,
        bvn: null,
        verified: null,
        verifyStatus: "0",
        phone1: null,
        phone2: null,
        phones: null,
        email1: null,
        email2: null,
        address1: null,
        address2: null,
        record: null,
        owner: null,
        planType: null,
        charge: null,
        method: null,
        walletBalance: null,
        createdAt: null,
        type: null,
        billingstatus: "0",
        planTerm: null,
        archived: null,
        paid: null,
        currency: null,
        account: null,
        customer: null,
        apiName: null,
        score: null,
        env: null,
        lastUpdated: null,
        photoId: null,
        state: null,
        remark: null,
        reqResult: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加身份验证数据";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getExt_identity_result(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改身份验证数据";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateExt_identity_result(this.form).then(response => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addExt_identity_result(this.form).then(response => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm('是否确认删除身份验证数据编号为"' + ids + '"的数据项?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function() {
        return delExt_identity_result(ids);
      }).then(() => {
        this.getList();
        this.msgSuccess("删除成功");
      })
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所有身份验证数据数据项?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function() {
        return exportExt_identity_result(queryParams);
      }).then(response => {
        this.download(response.msg);
      })
    }
  }
};
</script>
